package com.xxxx;

import com.xxxx.dao.BookDao;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Created By ShaoXikai on 2022/7/19
 */
public class App {
    public static void main(String[] args) {
        ApplicationContext ac = new ClassPathXmlApplicationContext("beans.xml");
        // DataSource dataSource1 = ac.getBean("c3po_dataSource", DataSource.class);
        // DataSource dataSource2 = ac.getBean("druid_dataSource", DataSource.class);
        BookDao bookDao = ac.getBean("bookDao", BookDao.class);
        bookDao.sout();
        System.out.println(System.getenv());
        // System.out.println(dataSource1);
        // System.out.println(dataSource2);
    }
}
